package edu.cuit.avatar.p2;

import java.time.LocalDate;
import java.util.Date;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/7/4 15:33
 */
public class StringTest {
    public static void main(String[] args) {
        String message = "this is a pen!";
        String str = message.replace("is", "**");
        System.out.println("替换前的字符串:" + message);
        System.out.println("替换后的字符串:" + str);
        System.out.println("========================================");

        Employee employee = new Employee("牛马");
        System.out.println(employee.toString());
        Date hireDate = employee.getHireDate();

        hireDate.setTime(System.currentTimeMillis() / 10); //引用对象发生了改变
        System.out.println(employee.toString());

        System.out.println("修改的date:" + hireDate);
    }
}
